package com.cndw.kungfu.domain;

import java.util.List;

import com.cndw.kungfu.core.LogSyncServer;
import com.cndw.kungfu.model.Context;

/**
 * 玩家操作日志
 * @author fantadust [9677889@qq.com]
 * @date 2011-10-26 下午4:14:47
 */
public class LogPlayer {

	private int id;
	/**
	 * 角色id
	 */
	private long playerId;
	/**
	 * 对象id
	 */
	private int objectId;
	/**
	 * 事件id
	 */
	private int eventId;
	/**
	 * 等级
	 */
	private int level;
	private long exp;
	/**
	 * 金币
	 */
	private int gold;
	/**
	 * 绑定金币
	 */
	private int goldTicke;
	/**
	 * 财富
	 */
	private long asset;
	/**
	 * 参数
	 */
	private String params;
	/**
	 * ip
	 */
	private String ip;
	/**
	 * 添加时间
	 */
	private int addTime;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public long getPlayerId() {
		return playerId;
	}
	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}
	public int getObjectId() {
		return objectId;
	}
	public void setObjectId(int objectId) {
		this.objectId = objectId;
	}
	public int getEventId() {
		return eventId;
	}
	public void setEventId(int eventId) {
		this.eventId = eventId;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public int getGold() {
		return gold;
	}
	public void setGold(int gold) {
		this.gold = gold;
	}
	public int getGoldTicke() {
		return goldTicke;
	}
	public void setGoldTicke(int goldTicke) {
		this.goldTicke = goldTicke;
	}
	public long getAsset() {
		return asset;
	}
	public void setAsset(long asset) {
		this.asset = asset;
	}
	public String getParams() {
		return params;
	}
	public void setParams(String params) {
		this.params = params;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public int getAddTime() {
		return addTime;
	}
	public void setAddTime(int addTime) {
		this.addTime = addTime;
	}
	public long getExp() {
		return exp;
	}
	public void setExp(long exp) {
		this.exp = exp;
	}

	public void syncDB() {
		
		LogSyncServer.getInstance().commitSync(this);
	}
	public static void save(List<LogPlayer> logBatchObjects) {
		Context.getSyncServer().syncDB(logBatchObjects);
		
	}
	
	
	
	
}
